<?php 
//*********************************** 
//Universal Media Publishing Platform
//Meta tags
//*********************************** 
if(isset($datype)){
    switch ($datype) {
        case "category":
		    $meta["title"] = $sitename;
			$meta["description"] = "";
			$meta["keywords"] = "";
			if (!$cat[0]["caid"]==0){ 
			$meta["title"] = $meta["title"].' - '.$cat[0]["title"];
			$meta["description"] = $cat[0]["description"];
			$meta["keywords"] = $cat[0]["keywords"];
			}
        break;
        case "fullstory":
			if (isset($news[0])){
				$meta["title"] = $sitename.' - '.$news[0]["title"];
				$meta["description"] = $news[0]["description"];
				$meta["keywords"] = $news[0]["keywords"];
			}
			else{
				$meta["title"] = $sitename.' - главная';
				$meta["description"] = $description;
				$meta["keywords"] = $keywords;
			}
        break;
        case "index":
			$meta["title"] = $sitename.' - главная';
			$meta["description"] = $description;
			$meta["keywords"] = $keywords;
	    break;
		case "byArtist":
			$meta["title"] = $sitename;
			$meta["description"] = $description;
			$meta["keywords"] = $keywords;
			if (!$art[0]["name"]==""){ 
				$meta["title"] = $meta["title"].' - Все треки исполнителя '.$art[0]["name"];
				$meta["description"] = $meta["description"]. ' Треки исполнителя '. $art[0]["name"];
				$meta["keywords"] = $meta["keywords"]. ' Треки исполнителя '. $art[0]["name"];
			}
			
	    break;
		case "static":
			if (isset($static[0])){
				$meta["title"] = $sitename.' - '.$static[0]["title"];
				$meta["description"] = $static[0]["description"];
				$meta["keywords"] = $static[0]["keywords"];
			}
			else{
				$meta["title"] = $sitename.' - главная';
				$meta["description"] = $description;
				$meta["keywords"] = $keywords;
			}
        break;
		default:
            $meta["title"] = $sitename;
			$meta["description"] = $description;
			$meta["keywords"] = $keywords;
			break;
    }
} 

?>
